﻿<UserControl x:Class="ViewDataSourceList"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
             mc:Ignorable="d" 
             d:DesignHeight="300" d:DesignWidth="300">
    <Grid>
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto"/>
            <RowDefinition Height="*"/>
            <RowDefinition Height="*"/>
        </Grid.RowDefinitions>
        
        <Button Margin="5" Padding="5" Content="Nouvelle Source de Donnees" FontSize="16" Background="White" Foreground="Green" Click="Button_Click_1"  Focusable="False"  />

        <DataGrid AutoGenerateColumns="false" Name="DataSourceListDataGrid" IsSynchronizedWithCurrentItem="True" Grid.Row="1" ItemsSource="{Binding DataSourceList}" ColumnWidth="*" CanUserAddRows="False" >
            <DataGrid.Columns>
                <DataGridTextColumn Binding="{Binding Type}" Header="Type" IsReadOnly="True" />
                <DataGridTextColumn Binding="{Binding Name, Mode=TwoWay}" Header="Nom" />
                <DataGridTextColumn Binding="{Binding DataSourceName}" Header="Nom de la source" IsReadOnly="True" />
            </DataGrid.Columns>
        </DataGrid>
        <!--<DataGrid IsReadOnly="True"  IsSynchronizedWithCurrentItem="True" Grid.Row="2" ItemsSource="{Binding DataSourceList/Data}" ColumnWidth="150"/>-->
    </Grid>
</UserControl>
